#include "Protocol_FTP.h"

CProtocol_FTP::CProtocol_FTP(void)
{
	name = "FTP";
}

CProtocol_FTP::~CProtocol_FTP(void)
{
}

StackUtils::e_Status CProtocol_FTP::Decode( CPacket& packet )
{
	packet.removeElements(0, name.size() + 2);
	packet.removeElements(packet.getBufferContent().size() - (name.size() + 2), name.size() + 2);
	return StackUtils::E_SUCCESS;
}

StackUtils::e_Status CProtocol_FTP::Encode( CPacket& packet )
{
	packet.addFront("[FTP]");
	packet.addBack("[FTP]");
	return StackUtils::E_SUCCESS;
}
